1. Field of the Invention
This invention relates to a coding apparatus designed to reduce the amount of data of digital image signal for use in a digital image signal recording apparatus such as a digital VCR, etc.
2. Description of Related Art
FIG. 1 is a block diagram showing the structure of a conventional coding apparatus disclosed, for example, in IEEE Transactions on Consumer Electronics, Vol. 34, No. 3 (AUGUST, 1988) under the title of "AN EXPERIMENTAL DIGITAL VCR WITH 40MM DRUM, SINGLE ACTUATOR AND DCT-BASED BIT-RATE REDUCTION". Referring to this FIG. 1, a formatting circuit 1 divides an inputted digital image into a plurality of blocks and outputs the image signals of each block to a DCT circuit 2. The image signals of each block are subjected to Discrete Cosine Transform (hereinafter referred to as DCT) by the DCT circuit 2 which then outputs coefficients to a quantizing unit 3. The quantizing unit 3 holding a plurality of quantization tables having different quantization steps from each other selects the optimum quantization table in compliance with the coefficients and quantizes the coefficients in the block to output the quantized coefficients to a variable length coding unit 4. The variable length coding unit 4 performs variable length coding on the quantized coefficients, generating variable-length-coded coefficients to a buffer memory 5. The buffer memory 5 transforms the variable-length-coded image signal at a fixed rate and stores the same. A controller 6 selects a quantization parameter for the quantizing unit 3 and coefficients to be coded in the variable length coding unit 4 so that the buffer memory 5 does not overflow.
The conventional coding apparatus in the aforementioned structure will operate in the following manner. The inputted digital image signal is composed of, e.g., a luminance signal and two color difference signals which are subjected to time-division multiplex and then divided into blocks, for example, consisted of 8 picture elements.times.8 lines in the formatting circuit 1 and outputted to the DCT circuit 2. In the DCT circuit 2, supposing that the inputted image signal in each block is expressed by x(i,j) (i, j=0, 1, . . . , 7), DCT on 8 picture elements in horizontal direction is performed to the image signal based on the equations as below; ##EQU1## Thereafter, DCT on 8 picture elements in vertical direction is conducted to the transformed image signal f(O,j) and f(m,j) as indicated below, whereby the image signal is expressed by coefficients F(m,n) (m, n=0, 1, . . . , 7) and outputted to the quantizing unit 3; ##EQU2##
The obtained coefficients are quantized in the quantizing unit 3 in accordance with the quantization step selected on the basis of the content thereof and quantizing parameter from the controller 6. In the case where the content of the coefficients represents an image of a leading edge part with strong contrast, a coarse quantization step is selected. On the other hand, if the content of the coefficients show an image of a detailed part with small amplitude, a fine quantization step is selected.
The quantized coefficients are stored in the buffer memory 5 after they are subjected to variable length coding in the variable length coding unit 4. The amount of data stored in the buffer memory 5 is so checked by the controller 6 as not to overflow. The controller 6 determines the quantization parameter in compliance with the amount of data stored in the buffer memory 5 and outputs the same to the quantizing unit 3. Moreover, the controller 6 selects coefficients to be coded by the variable length coding unit 4 in accordance with the amount of data, and outputs the coefficients to the variable length coding unit 4. The data stored in the buffer memory 5 is read at a fixed rate.
FIG. 2 is a block diagram showing the structure of another conventional coding apparatus disclosed, for example, in the prior art referred to earlier. The parts designated by the same reference numerals in FIG. 2 are similar to those in FIG. 1 and therefore detailed description thereof will be abbreviated here. A weighting unit 7 of this apparatus makes a difference, which is intervened between the formatting circuit 1 and quantizing unit 3 so as to perform weighting on the coefficients outputted from the DCT circuit 2. The quantizing unit 3 quantizes each coefficient subjected to weighting by the weighting unit 7.
The operation of the coding apparatus of FIG. 2 will be discussed below. Similar to the example shown in FIG. 1, the image signal is divided into blocks by the formatting circuit 1 and then, the image signal in each block is processed by DCT on 8 picture elements in horizontal and vertical directions in the DCT circuit 2. The resultant coefficients F(m,n) are generated to the weighting unit 7. Each coefficient from the DCT circuit 2 is subjected to weighting in the weighting unit 7. More specifically, supposing that the result of DCT operation for each block of 8 picture elements.times.8 lines is divided into four areas as indicated in FIG. 3, as utilizing the fact that the human eyesight is weak to high spatial frequencies, such a weighting factor W(m,n) is used so that weighting with low rate is conducted for an area F4 including high spatial frequency components, whereas weighting with high rate is performed for an area F1 including low spatial frequency components (refer to FIG. 4). ##EQU3##
The coefficients after being subjected to weighting are outputted to the quantizing unit 3. Since the subsequent operation in the quantizing unit 3, buffer memory 5 and controller 6 is carried out in the same manner as in the coding apparatus of FIG. 1, description thereof will be abbreviated.
Although the conventional coding apparatuses are constructed as described hereinabove, they still have problems remaining to be solved as to the selection of the quantization step and constitution of the weighting unit.
For example, the quantization step is selected in the quantizing unit 3 in accordance with an alternating current power E obtained from the coefficients F(m,n) by an equation; ##EQU4## A fine quantization is performed when the alternating current power E is small, while quantization is done in a coarse manner if the power E is large. In other words, a detailed part of an image having a small change in amplitude is quantized finely. On the other hand, and edge part with strong contrast is quantized in a coarse manner. If an image includes lines with high contrast in a flat part of a flat background where the image signal changes little, the block of the image is quantized coarsely. However, quantization errors spread all over the block subsequent to an inverse DCT at a decoder side, thereby causing overlapping of noises even in the flat part. Since the noises in the flat part appear considerably annoying, the image quality cannot be free from undesirable degradation.
Moreover, 8.sup.2, namely, 64 read only memories (ROM'S)) are necessitated to perform weighting on the coefficients of each block size 8.times.8, thus making the weighting unit bulky in size.